package com.cq.hd.task.web.job;

import com.cq.hd.member.api.TbAutoWithdrawalApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 普通商户本金自动提现任务
 *
 * @author much
 * @since 2024/04/13 13:35
 */
@Slf4j
@Component
public class AutoWithdrawalTask {

    @Resource
    private TbAutoWithdrawalApi autoWithdrawalApi;

    /**
     * 普通商户自动自动提现
     * 频率：1次/h
     */
    @XxlJob("scanAutoWithdrawal")
    public void scanAutoWithdrawal() {
        log.info("扫描自动提现记录=====>开始");
        autoWithdrawalApi.scanWaitWithdrawalRecords();
        log.info("扫描自动提现记录=====>结束");
    }

}
